val reversedList = oldList.reversed()
// Example
fun main() {
val list = listOf("A", "B", "C")
println(list)
val reversed = list.reversed()
println(reversed)
}
import java.util.Collections
fun main() {
val days: List<String> = listOf("Sunday", "Monday", "Friday")
Collections.reverse(days)
println(days) // [Friday, Monday, Sunday]
}